//
//  LGSlideViewController.m
//  LGSeller
//
//  Created by MAC on 2017/10/14.
//  Copyright © 2017年 czl. All rights reserved.
//

#import "LGSlideViewController.h"
#import <RESideMenu.h>
#import "LGFirstViewController.h"

@interface LGSlideViewController ()

@end

@implementation LGSlideViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    UIViewController *vc;
    switch (indexPath.row) {
            case 0:
            vc = [LGFirstViewController new];
            break;
            case 1:
            vc = [LGFirstViewController new];
            break;
            case 2:{
                [UIApplication sharedApplication].keyWindow.rootViewController = [[UIStoryboard storyboardWithName:@"logins" bundle:nil] instantiateViewControllerWithIdentifier:@"LGLoginViewController"];
                return;
            }
            break;
        default:
            
            break;
    }
//    跳转
    UITabBarController *tabbarVC = (UITabBarController *)self.sideMenuViewController.contentViewController;
    [((UINavigationController *)tabbarVC.selectedViewController) pushViewController:vc animated:YES];
    [self.sideMenuViewController hideMenuViewController];
}


@end
